<template>
  <button @click="flag = !flag">切换懒加载图片案例</button>
  <div v-if="flag">
    <div>局部指令案例</div>
    <LocalityDirective />
    <hr />
    <div>权限按钮</div>
    <Power />
    <hr />
    <div>拖拽案例</div>
    <Drag />
  </div>
  <LazyLoad v-else />
</template>

<script setup lang="ts">
import { ref } from 'vue';
const flag = ref<boolean>(false);
// 局部指令案例
import LocalityDirective from './LocalityDirective.vue';

// 权限按钮
import Power from './Power.vue';

// 拖拽案例
import Drag from './Drag.vue';

// 懒加载图片案例
import LazyLoad from './LazyLoad.vue';
</script>
